﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 学生成绩管理系统.Scoreinfo
{
    public partial class addScore2 : Form
    {
        public addScore2()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string strSql;
            DataAccess data = new DataAccess();
            strSql = "insert into Scoreinfo(Sid,Cid,Score) values('" + textBox1.Text + "','" + textBox4.Text + "'','" + textBox2.Text + "')";
            data.dataCon();
            if (data.sqlExec(strSql))
            {
                MessageBox.Show("添加成功！！");

            }
            else { MessageBox.Show("添加失败！！"); }
        }
    }
}
